<template>
    <ul>
        <li v-for="category in categories" :key="category.id">
            {{ category.title }}
            <ul v-if="category.children" class="third-list">
                <sub-category-third :categories="category.children"></sub-category-third>
            </ul>
        </li>
    </ul>
</template>
  
<script>
import SubCategoryThird from './SubCategoryThird.vue';
export default {
    name: 'SubCategory',
    components: { SubCategoryThird },
    props: {
        categories: Array
    }
};
</script>

<style lang="less" scoped>
ul.third-list {
    padding-left: 10px;
    box-sizing: border-box;
}
</style>